package com.ruicar.afs.cloud.afscase.monitor.controller;

import com.ruicar.afs.cloud.afscase.monitor.service.AgingMonitorService;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author Peng Jinbo
 * @Date 2020/09/18 13:07
 */
@Slf4j
@AllArgsConstructor
@RestController
@RequestMapping("/monitor")
public class AgingMonitorController {

    private AgingMonitorService agingMonitorService;


    @GetMapping("/listByLeader")
    public IResponse listByLeader(){
        return IResponse.success(agingMonitorService.leaderMonitor());
    }


    @GetMapping("/listByDepartment")
    public IResponse listByDepartment(){
        return IResponse.success(agingMonitorService.departmentMonitor());
    }
}
